<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="{{asset('layui-master/src/css/layui.css')}}">
    <style>
        #username{
            color: #1E9FFF;
        }
    </style>
</head>
<body>

<ul class="layui-nav">
    <li class="layui-nav-item">
        <a href="javascript:;">控制台<span class="layui-badge">9</span></a>
    </li>
    <li class="layui-nav-item">
        <a href="javascript:;">个人中心<span class="layui-badge-dot"></span></a>
    </li>
    <li class="layui-nav-item" lay-unselect="">
        <a href="javascript:;">
            <img src="//t.cn/RCzsdCq" class="layui-nav-img">
            你好，亲爱的
            <span id="username">
                {{Auth::guard('admin')->user()->username}}
            </span>
            用户
        </a>
        <dl class="layui-nav-child">
            <dd><a href="/admin/changePassword">我的账户</a></dd>
            <dd><a href="/admin/userManage">用户管理</a></dd>
            <dd><a href="/admin/lesson">课程管理</a></dd>
            <dd><a href="/admin/logout">退出</a></dd>
        </dl>
    </li>
</ul>

<script type="text/javascript" src="{{asset('layui-master/src/layui.js')}}"></script>

<script>
    layui.use('element', function(){
        var element = layui.element; //导航的hover效果、二级菜单等功能，需要依赖element模块

        //监听导航点击
        element.on('nav(demo)', function(elem){
            //console.log(elem)
            layer.msg(elem.text());
        });
    });
</script>

</body>
</html>